package com.example.vm.domain.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.common.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Arrays;
import java.util.List;

@EqualsAndHashCode(callSuper = false)
@Data
public class Type extends BaseEntity {
    private static final long serialVersionUID = 1L;
    //分类名称
    private String name;
    //分类描述
    private String description;
    //分类图标
    private String icon;
    //分类是否开放
    private short open; //1开放0，不开放
    //标签名字
    private String labelNames;
    //是否被使用
    @TableField(exist = false)
    private short used;
    

    public List<String> getlabelNames(){
        return Arrays.asList(labelNames.split(","));
    }
}
